import json


class Bean(object):
    def __init__(self):
        # 1.黔贵名酒  2.金币商品 3.精品名茶 4.臻品山货 5.维C刺梨6.高山油茶 7.无辣不欢 8.药食同源 9.特色肉产 10.贵州特产 11.民族工艺品
        # self.list = ["868250804392407040", "868250804476293120", "868250804404989952", "868250804413378560",
        #              "868250804434350080",
        #              "868250804446932992", "868250804438544384", "868250804430155776", "868250804455321600",
        #              "868250804451127296", "868250804463710208"]


        self.list = ["868250804404989952", "868250804413378560",
                     "868250804434350080",
                     "868250804446932992", "868250804438544384", "868250804430155776", "868250804455321600",
                     "868250804451127296", "868250804463710208"]


        # 首页分类列表body参数

    def __get_goods_list_body_params(self, toplevel_id):
        return {"brandIds": None, "tagIds": None, "categoryId": None, "topLevelId": toplevel_id,
                "keyword": None,
                "page": 1, "size": 30, "sort": None, "mobile": None, "levelId": None, "levelCode": None,
                "integralType": None}

        # 商品详情页的body参数

    def get_goods_details_body_params(self, toplevel_id, product_id):
        return {
            "inToDetailChannel": "NORMAL",
            "levelCode": "GRHY01",
            "levelId": toplevel_id,
            "memberType": "COMMON",
            "productId": product_id
        }

    def get_goods_list(self):
        data = []
        for item in self.list:
            data.append(self.__get_goods_list_body_params(item))
        return data
